package com.b2.controller.wx;

import com.b2.pojo.dto.addParentDto;
import com.b2.pojo.dto.addTeacherDto;
import com.b2.result.Result;
import com.b2.service.ParentService;
import com.b2.service.TeacherService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/wx/parent")
@Slf4j
@Api(tags = "微信家长相关接口")
@CrossOrigin
public class ParentController {

    @Autowired
    ParentService parentService;
    //家长通过邀请码创建身份信息
    @PostMapping("addparent")
    public Result addparent(@RequestBody addParentDto parent){
        parentService.addparent(parent);
        return Result.success();
    }
}